from django.urls import path
from . import views
from .views import CView
'''
1. Add an import:  from my_app import views
2. Add a URL to urlpatterns:  path('', views.home, name='home')
'''

app_name = 'other'
# 应用路由
urlpatterns = [
    # 第一个参数是路由路径，第二个参数是路由对应的视图路由
    # 第三个参数是路由名字
    path('orm/', views.orm, name="orm"),
    path('CView1/', views.CView.as_view(), name="CView1"),
    path('CView2/', views.CTemplateView.as_view(), name="CView2"),
    path('CView3/', views.CListView.as_view(), name="CView3"),
    path('CView4/<int:id>', views.CDetailView.as_view(), name="CView4"),

]